package com.nuoniu.sibanyun.mapper.cm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.cm.CmContractStage;
import com.nuoniu.sibanyun.entity.cm.CmContractStageGroup;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 合同阶段组 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2021-10-20
 */
public interface CmContractStageGroupMapper extends BaseMapper<CmContractStageGroup> {

    /**
     * 获取根据名称获取
     * @author 小啊刚
     * @date 2021-10-21
     */
    @Select("select * from cm_contract_stage_group where name=#{name} and company_id=#{companyId} limit 1")
    CmContractStageGroup getByName(CmContractStageGroup stageGroup);

    /**
     * 获取根据编码获取
     * @author 小啊刚
     * @date 2021-10-21
     */
    @Select("select * from cm_contract_stage_group where code=#{code} and company_id=#{companyId} limit 1")
    CmContractStageGroup getByCode(CmContractStageGroup stageGroup);

}
